home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Source Code / Libraries / BSP Tree 1.2 / Sources / Graphics / source / iterator_3d.cp < prev    next >
Encoding:
Text File  |  1995-03-26  |  1.7 KB  |  37 lines  |  [TEXT/MPCC]

  1. //------------------------------------------------------------------------------
  2. //    File:                    iterator.cp
  3. //    Date:                    9/26/94
  4. //    Author:                Bretton Wade
  5. //
  6. //    Description:    this file contains the class methods for a list iterator
  7. //
  8. //------------------------------------------------------------------------------
  9.  
  10. #include "iterator_3d.h"
  11.  
  12. //------------------------------------------------------------------------------
  13. //    constructor
  14. //------------------------------------------------------------------------------
  15. iterator::iterator (const listptr &l)                                                                                        //    normal constructor
  16. {                                                                                                                                                                //    begin
  17.     list = l;                                                                                                                                            //    copy the list pointer
  18.     Reset ();                                                                                                                                            //    start at the head of the list
  19. }                                                                                                                                                                //    end
  20.  
  21. //------------------------------------------------------------------------------
  22. //    destructor
  23. //------------------------------------------------------------------------------
  24. iterator::~iterator (void)                                                                                                            //    destructor
  25. {                                                                                                                                                                //    begin
  26. }                                                                                                                                                                //    end
  27.  
  28. //------------------------------------------------------------------------------
  29. //    start over
  30. //------------------------------------------------------------------------------
  31. void        iterator::Reset (void)                                                                                                    //    start at the head of the list
  32. {                                                                                                                                                                //    begin
  33.     current = list->head;                                                                                                                    //    set the current node to the head of the list
  34. }                                                                                                                                                                //    end
  35.  
  36. //------------------------------------------------------------------------------
  37.